package org.cx.comparator.map;

import org.cx.comparator.compare.mode.ComparatorType;
import lombok.Data;


@Data
public class ComparatorFieldMapping {

    private final String source;
    private final String target;
    private final ComparatorType comparatorType;
    private final String expression;
    private final String fieldName;
    private final String notEqualsSourceVal;
    private final String notEqualsTargetVal;


    public ComparatorFieldMapping(String source, String target, ComparatorType comparatorType, String expression, String fieldName, String notEqualsSourceVal, String notEqualsTargetVal) {
        this.source = source;
        this.target = target;
        this.comparatorType = comparatorType;
        this.expression = expression;
        this.fieldName = fieldName;
        this.notEqualsSourceVal = notEqualsSourceVal;
        this.notEqualsTargetVal = notEqualsTargetVal;

    }

    public ComparatorFieldMapping(String source, String target, ComparatorType comparatorType, String expression, String fieldName) {
        this(source, target, comparatorType, expression, fieldName, null, null);
    }

    public ComparatorFieldMapping(String source, String target, ComparatorType comparatorType) {
        this(source, target, comparatorType, null, null);
    }

    public ComparatorFieldMapping(String source, String target, String fieldName) {
        this(source, target, ComparatorType.DEFAULT, null, fieldName);
    }

    public ComparatorFieldMapping(String source, String target) {
        this(source, target, ComparatorType.DEFAULT, null, null);
    }
}
